package com.ytjj.quartz.dao;

import com.ytjj.qmyx.mall.model.ProductInfoStatistics;
import com.ytjj.quartz.model.MessageRecord;
import com.ytjj.quartz.model.OrdersInfo;
import com.ytjj.quartz.model.ProductInfoRequest;
import com.ytjj.quartz.model.dto.RepeatPayOrderRecordDto;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 *
 * @version 1.0
 * 
 */
public interface OrdersInfoDao {

    /**
     * 查询昨天订单信息
     *
     * @return
     */
    List<OrdersInfo> selectNumYesterDay(Integer productId);

    /**
     * 查询昨天订单信息
     *
     * @return
     */
    List<OrdersInfo> selectRealNumYesterDay(Integer productId);

    /**
     * 查询今天订单信息
     *
     * @return
     */
    List<OrdersInfo> selectNumNowDay(Integer productId);

    /**
     * 查询今天订单信息
     *
     * @return
     */
    List<OrdersInfo> selectRealNumNowDay(Integer productId);

    Integer getOrderNum(@Param("pageSource") String pageSource,
                        @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getRealOrderNum(@Param("pageSource") String pageSource,
                        @Param("startTime") String startTime, @Param("endTime") String endTime);

    Integer getPayNum(@Param("pageSource") String pageSource,
                      @Param("startTime") String startTime, @Param("endTime") String endTime);

    BigDecimal getPayMoney(@Param("pageSource") String pageSource,
                           @Param("startTime") String startTime, @Param("endTime") String endTime);

    BigDecimal getCostAmount(@Param("pageSource") String pageSource,
                             @Param("startTime") String startTime, @Param("endTime") String endTime);

    void updateMessage(@Param("id") Integer id);

    List<ProductInfoStatistics> getProductInfo(ProductInfoRequest productInfoRequest);

    Integer getUvInfo(ProductInfoRequest productInfoRequest);

    Integer getOrderNumInfo(ProductInfoRequest productInfoRequest);

    Integer getRealOrderNumInfo(ProductInfoRequest productInfoRequest);

    Integer getPayOrderNumInfo(ProductInfoRequest productInfoRequest);

    BigDecimal getCostMoneyInfo(ProductInfoRequest productInfoRequest);

    BigDecimal getPrice(ProductInfoRequest productInfoRequest);

    BigDecimal getSalesVolume(ProductInfoRequest productInfoRequest);

    List<ProductInfoStatistics> getActivityProductInfo(ProductInfoRequest productInfoRequest);

    Integer getActivityUv(ProductInfoRequest productInfoRequest);

    Integer getActivityOrderNum(ProductInfoRequest productInfoRequest);

    Integer getActivityRealOrderNum(ProductInfoRequest productInfoRequest);

    Integer getActivityPayOrderNum(ProductInfoRequest productInfoRequest);

    BigDecimal getActivityCostMoneyInfo(ProductInfoRequest productInfoRequest);

    BigDecimal getActivityPrice(ProductInfoRequest productInfoRequest);

    BigDecimal getActivitySalesVolume(ProductInfoRequest productInfoRequest);

    List<MessageRecord> getOrdersInfoAndExpressNoIsNotNull();

    List<String> selectIsPayOrder();

    Integer selectByChildOrderNo(String childOrderNo);

    List<String> selectIsPayOrderBy1Day();

    List<String> uploadOrderToSupplyByEveryday();

    List<RepeatPayOrderRecordDto> queryRepeatPayOrder();
    List<String> queryRelPayIsSuccessButOrderIsTimeout();
    List<String> refundAfterOrderStatusError();

    int revisePayIsSuccessButOrderIsNoPay(@Param("orderNos") List<String> orderNos);
}
